<template>
  <div class="fixed-wrapper">
    <div class="tool-wrapper">
      <div class="title-wrapper">
        <span class="title">{{ title }}</span>
        <div class="icon" @click="changeListStatus">
          <el-icon>
            <CaretRight />
          </el-icon>
        </div>
      </div>

    </div>
  </div>

</template>

<script lang="ts">
import { computed, inject, onMounted } from "vue"
import { ElIcon, ElMessage, ElMessageBox, ElTooltip } from "element-plus"
import { CaretRight } from '@element-plus/icons-vue'
import { Lang } from "~constants/locale"

console.log('11')

export default {
  name: 'ToolMenu',
  components: {
    ElIcon,
    ElTooltip,
    CaretRight,
  },

  setup() {
    const title = computed(() => {
      return Lang.message('zhiXiaoHong')
    })
    console.log(XMLHttpRequest.prototype)
    const changeListStatus = () => { }
    const onreadystatechange = XMLHttpRequest.prototype.onreadystatechange
    XMLHttpRequest.prototype.onreadystatechange = function (...args) {
      console.log(this)
      onreadystatechange.bind(this, ...args)
    }

    return {
      title,
      changeListStatus,
    }
  }
}
</script>
